package com.qys.livesMall.shop.modal.dto.shop.rwnew;

import com.qys.livesMall.framework.view.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.List;

/**
 * @menu ShopRechargeSearch
 * @date 2023/11/11 13:49
 */
@Data
public class ShopRechargeSearch extends BaseQuery {

    @Schema(description = "用户直推")
    private String userDirectPush;

    @Schema(description = "用户三代")
    private String user3rdGeneration;

    @Schema(description = "用户伞下")
    private String userUnderUmbrella;


    @Schema(description = "店铺名称")
    private String shopName;

    @Schema(description = "余额范围下限")
    private BigDecimal balanceStart;

    @Schema(description = "余额范围上限")
    private BigDecimal balanceEnd;


    @Schema(description = "银行卡号/合约地址")
    private String accountNumber;


    @Schema(description = "会员层级")
    private Integer storey;

    @Schema(description = "首次充值 0：否：1：是")
    private Integer firstRecharge;

    @Schema(description = "充值状态 0：待审核，1充值成功，-1：充值失败")
    private Integer status;

    @Schema(description = "店铺id")
    private List<Long> shopIds;


    /**
     * 用户id
     */
    private List<Long> userIds;

    /**
     * 店铺类型
     */
    private Integer userSysType;

    /**
     * 店铺状态
     */
    private String shopStatus;

    /**
     * 是否充值
     */
    private Integer charged;

    private boolean exc;

    public void setUserDirectPush(String userDirectPush) {
        this.userDirectPush = userDirectPush;
        listener(userDirectPush);
    }

    public void setUser3rdGeneration(String user3rdGeneration) {
        this.user3rdGeneration = user3rdGeneration;
        listener(user3rdGeneration);
    }

    public void setUserUnderUmbrella(String userUnderUmbrella) {
        this.userUnderUmbrella = userUnderUmbrella;
        listener(userUnderUmbrella);
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
        listener(shopName);
    }

    public void setBalanceStart(BigDecimal balanceStart) {
        this.balanceStart = balanceStart;
        listener(balanceStart);
    }

    public void setBalanceEnd(BigDecimal balanceEnd) {
        this.balanceEnd = balanceEnd;
        listener(balanceEnd);
    }

    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
        listener(accountNumber);
    }

    public void setStorey(Integer storey) {
        this.storey = storey;
        listener(storey);
    }

    public void setFirstRecharge(Integer firstRecharge) {
        this.firstRecharge = firstRecharge;
        listener(firstRecharge);
    }

    public void setStatus(Integer status) {
        this.status = status;
        listener(status);
    }

    public void setShopIds(List<Long> shopIds) {
        this.shopIds = shopIds;
        listener(shopIds);
    }

    public void setUserSysType(Integer userSysType) {
        this.userSysType = userSysType;
        listener(userSysType);
    }

    public void setShopStatus(String shopStatus) {
        this.shopStatus = shopStatus;
        listener(shopStatus);
    }

    public void setCharged(Integer charged) {
        this.charged = charged;
        listener(charged);
    }

    @Override
    public void setStartTime(Object startTime) {
        super.setStartTime(startTime);
        listener(startTime);
    }

    @Override
    public void setEndTime(Object endTime) {
        super.setEndTime(endTime);
        listener(endTime);
    }

    private void listener(Object o){
        if (o!=null){
            if (StringUtils.isBlank(o.toString())){
                return;
            }
            this.exc=true;
        }
    }

}

